//
//  STColor.h
//  STBasicsApp
//
//  Created by jerry on 2019/5/1.
//  Copyright © 2019 jerry. All rights reserved.
//

#ifndef STColor_h
#define STColor_h

//常用的颜色
#define kClearColor     [UIColor clearColor]
#define kWhiteColor     [UIColor whiteColor]
#define kGragColor      [UIColor grayColor]
#define kBlackColor     [UIColor blackColor]
#define kRedColor       [UIColor redColor]
#define kGreenColor     [UIColor greenColor]
#define kBlueColor      [UIColor blueColor]
#define kYellowColor    [UIColor yellowColor]


//rgb颜色转换（16进制->10进制）
#define UIColorFromRGB(rgbValue) \
[UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]

// rgb颜色转换（16进制->10进制）
#define HexColor(rgbValue) ([UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0])

//自定义颜色
#define kColorRGB(x, y, z, alp)     [UIColor colorWithRed:x/255.0 green:y/255.0 blue:z/255.0 alpha:alp]
#define yColorRGB(x, y, z, alp)     [UIColor colorWithRed:x green:y blue:z alpha:alp]


#endif /* STColor_h */
